//
//  ViewFactory.h
//  DeyiLife
//
//  Created by zxin on 15/5/27.
//  Copyright (c) 2015年 Deyi. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface ViewFactory : NSObject <UIAlertViewDelegate>

DEFINE_SINGLETON_HEADER(ViewFactory)

- (UIScrollView *)makePageScrollView:(NSInteger)pageNums topBarHeight:(CGFloat)height;
- (UITableView *)makeTableView:(id)delegate Height:(CGFloat)height;
- (UITableView *)makeTableView:(id)delegate Height:(CGFloat)height  Width:(CGFloat)width;
- (UIScrollView *)makePageScrollViewWithFrame:(CGRect)frameRect andPageNums:(NSInteger)pageNums topBarHeight:(CGFloat)height;

- (UIScrollView *)resetPageScrollViewWithScrollView:(UIScrollView *)scrollView andFrame:(CGRect)frameRect andPageNums:(NSInteger)pageNums topBarHeight:(CGFloat)height;

//Navigation
+ (void)setNavigationBlack:(UIViewController *)vc;
+ (void)setNavigationWhite:(UIViewController *)vc;

+ (UIBarButtonItem *)makeNavigationBack:(id)target action:(SEL)action;
+ (UIBarButtonItem *)makeNavigationBackWhite:(id)target action:(SEL)action;
+ (UIBarButtonItem *)makeNavigationBack:(id)target action:(SEL)action backImg:(UIImage *)image;
+ (UILabel *)makeNavigationTitle:(NSString *)title;
+ (UILabel *)makeNavigationTextButtonBlack:(NSString *)title;
+ (UIButton *)makeNavigationTextButton:(NSString *)title;
+ (UIButton *)makeNavigationTextButtonWhite:(NSString *)title;

+ (UIButton *)makeNavigationBtnWithText:(NSString *)title  andImage:(NSString *)imageName;
//+ (UIBarButtonItem *)makeNavigationBack:(id)target action:(SEL)action backImg:(UIImage *)image NS_DEPRECATED_IOS(7_0,8_0);
+ (UILabel *)makeNavigationTitle:(NSString *)title  WithTextColor:(UIColor *)textColor NS_DEPRECATED_IOS(7_0, 8_0);
+ (UIButton *)makeNavigationBtnWithText:(NSString *)title  andImage:(NSString *)imageName andTextCol:(UIColor *)color;

+ (UIImage *)makeShareView:(UIImage *)image text:(NSString *)text;

//Notice
+ (void)dismissLoading;
+ (void)showLoadingEnableTouch;
+ (void)showLoadingEnableTouch:(NSString *)content;
+ (void)showLoading;
+ (void)showLoading:(NSString *)content;
+ (void)showSuccess:(NSString *)content;
+ (void)showInfoMsg:(NSString *)content;
+ (void)showNoMoreData;
- (void)showAccountException:(id)context;
+ (void)showErrorMsg:(YTKBaseRequest *)request;
+ (void)showErrorStrMsg:(NSString *)content;

//Show Login
+ (void)showLogin:(UIViewController *)context;

//Search
+ (UITableViewCell *)makeSearchKeyCell:(UITableView *)tableView;
+ (UITableViewCell *)makeSearchClearCell:(UITableView *)tableView;


+ (void)addRefreshHeader:(UITableView *)tableview;

+ (NSInteger)calculateHeight:(NSString *)content fontSize:(NSInteger)size delta:(NSInteger)delta;
@end
